<!-- 文件名：purchased.html -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head><title>购买过的商品</title></head>
<body>
<h2>购买过的所有商品</h2>

<table border="1px">
  <tr><th>商品名</th><th>价格</th></tr>
  <tr th:each="product : ${products}">
    <td th:text="${product.name}"></td>
    <td th:text="${product.price}"></td>
  </tr>
</table>

<a href="/products" th:href="@{'/products?username=' + ${user.username} }">返回商品列表</a>
</body>
</html>
